Properties and methods of comment objects

Each HTML comment is represented by a JavaScript object. The following table lists the properties and methods of comment objects in Dreamweaver, along with explanations where appropriate. A bullet (·) marks read-only properties.

Property or method Return value and explanation

nodeType ·

Node.COMMENT_NODE

parentNode ·

The parent tag.

childNodes ·

An empty nodelist.

data

The text string between the comment markers (<!-- and -->).

hasChildNodes()

FALSE